Eclipse Platform
Pre-release 3.0

org.eclipse.ui.progress
Interface IDeferredWorkbenchAdapter

All Superinterfaces:
IWorkbenchAdapter

public interface IDeferredWorkbenchAdapter
extends IWorkbenchAdapter

This adapter interface provides support for lazy initialization of UI workbench elements that are displayed visually. This adapter is used with an associated deferred content provider.

Since:
3.0 NOTE: This API is experimental and subject to change.
See Also:
DeferredTreeContentManager

Method Summary
 void fetchDeferredChildren(Object object, IElementCollector collector, IProgressMonitor monitor)
          Called by a job run in a separate thread to fetch the children of this adapter.
 ISchedulingRule getRule(Object object)
          Returns the rule used to schedule the deferred fetching of children for this adapter.
 boolean isContainer()
          Returns whether this adapter may have children.
 
Methods inherited from interface org.eclipse.ui.model.IWorkbenchAdapter
getChildren, getImageDescriptor, getLabel, getParent
 

Method Detail

fetchDeferredChildren

public void fetchDeferredChildren(Object object,
                                  IElementCollector collector,
                                  IProgressMonitor monitor)
Called by a job run in a separate thread to fetch the children of this adapter. The adapter should return notify of new children via the collector.

It is good practice to check the passed in monitor for cancellation. This will provide good responsiveness for cancellation requests made by the user.

Parameters:
object - the object to fetch the children for
collector - the collector to notify about new children
monitor - a progress monitor that will never be null to support reporting and cancellation.

isContainer

public boolean isContainer()
Returns whether this adapter may have children. This is an optimized method used by content providers to allow showing the [+] expand icon without having yet fetched the children for the element.

If false is returned, then the content provider may assume that this adapter has no children. If true is returned, then the job manager may assume that this adapter may have children.

Returns:
true if the rule is conflicting, and false otherwise.

getRule

public ISchedulingRule getRule(Object object)
Returns the rule used to schedule the deferred fetching of children for this adapter.

Parameters:
object - the object whose children are being fetched
Returns:
ISchedulingRule the scheduling rule

Eclipse Platform
Pre-release 3.0

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.